﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

    public class Host
    {
        static HttpContext Context = HttpContext.Current;
        static SqlDataReader dr;
        /// <summary>
        /// 返回Host表中的Host_EnClass字段，用以区分站
        /// </summary>
        /// <param name="_quest"></param>
        /// <returns></returns>
        public static string host_class(string _quest) {
            string classNum = null;
            //if(_quest != "www") {
            //    dr = (SqlDataReader)DbHelper.ExecuteReader(CommandType.Text, "select Host_EnClass from Host where Host_EnName='" + _quest + "'", null);
            //    if(dr.Read()) {
            //        classNum = dr[0].ToString();
            //        dr.Close();
            //        dr.Dispose();
            //    }
            //}
            return classNum;
        }

        /// <summary>
        /// 返回分站的标题头
        /// </summary>
        /// <param name="_quest">分站参数</param>
        /// <returns></returns>
        public static string host_TitleName(string _quest) {
            string fzName = null;
            SqlParameter param = new SqlParameter("@quest", _quest);
            //dr = (SqlDataReader)DbHelper.ExecuteReader(CommandType.Text, "select Host_CnName from Host where Host_EnName=@quest", param);
            //if(dr.Read()) {
            //    fzName = dr[0].ToString() + " - ";
            //    dr.Close();
            //    dr.Dispose();
            //}
            return fzName;
        }
    }
